package red.mlz.gameservice.controller.gametagrelation;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import red.mlz.common.entity.gametagrelation.GameTagRelation;
import red.mlz.gameservice.service.gametagrelation.GameTagRelationService;

import java.util.List;

@RestController
@Slf4j
public class GameTagRelationController {

    @Autowired
    private GameTagRelationService gameTagRelationService;

    @RequestMapping("/gameTagRelationService/")
    public List<GameTagRelation> findByGameId(@RequestParam(name = "id") Long gameId){
        return gameTagRelationService.findByGameId(gameId);
    }
}
